home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / include / RCS / syslog.h,v < prev    next >
Encoding:
Text File  |  1988-07-02  |  2.9 KB  |  100 lines

  1. head     1.1;
  2. access   ;
  3. symbols  ;
  4. locks    ; strict;
  5. comment  @ * @;
  6.  
  7.  
  8. 1.1
  9. date     88.07.02.15.14.25;  author ouster;  state Exp;
  10. branches ;
  11. next     ;
  12.  
  13.  
  14. desc
  15. @@
  16.  
  17.  
  18.  
  19. 1.1
  20. log
  21. @Initial revision
  22. @
  23. text
  24. @/*
  25.  * Copyright (c) 1982, 1986 Regents of the University of California.
  26.  * All rights reserved.  The Berkeley software License Agreement
  27.  * specifies the terms and conditions for redistribution.
  28.  *
  29.  *    @@(#)syslog.h    7.8 (Berkeley) 5/26/88
  30.  */
  31.  
  32. /*
  33.  *  Facility codes
  34.  */
  35.  
  36. #define LOG_KERN    (0<<3)    /* kernel messages */
  37. #define LOG_USER    (1<<3)    /* random user-level messages */
  38. #define LOG_MAIL    (2<<3)    /* mail system */
  39. #define LOG_DAEMON    (3<<3)    /* system daemons */
  40. #define LOG_AUTH    (4<<3)    /* security/authorization messages */
  41. #define LOG_SYSLOG    (5<<3)    /* messages generated internally by syslogd */
  42. #define LOG_LPR        (6<<3)    /* line printer subsystem */
  43. #define LOG_NEWS    (7<<3)    /* network news subsystem */
  44. #define LOG_UUCP    (8<<3)    /* UUCP subsystem */
  45.     /* other codes through 15 reserved for system use */
  46. #define LOG_LOCAL0    (16<<3)    /* reserved for local use */
  47. #define LOG_LOCAL1    (17<<3)    /* reserved for local use */
  48. #define LOG_LOCAL2    (18<<3)    /* reserved for local use */
  49. #define LOG_LOCAL3    (19<<3)    /* reserved for local use */
  50. #define LOG_LOCAL4    (20<<3)    /* reserved for local use */
  51. #define LOG_LOCAL5    (21<<3)    /* reserved for local use */
  52. #define LOG_LOCAL6    (22<<3)    /* reserved for local use */
  53. #define LOG_LOCAL7    (23<<3)    /* reserved for local use */
  54.  
  55. #define LOG_NFACILITIES    24    /* maximum number of facilities */
  56. #define LOG_FACMASK    0x03f8    /* mask to extract facility part */
  57.  
  58. #define LOG_FAC(p)    (((p) & LOG_FACMASK) >> 3)    /* facility of pri */
  59.  
  60. /*
  61.  *  Priorities (these are ordered)
  62.  */
  63.  
  64. #define LOG_EMERG    0    /* system is unusable */
  65. #define LOG_ALERT    1    /* action must be taken immediately */
  66. #define LOG_CRIT    2    /* critical conditions */
  67. #define LOG_ERR        3    /* error conditions */
  68. #define LOG_WARNING    4    /* warning conditions */
  69. #define LOG_NOTICE    5    /* normal but signification condition */
  70. #define LOG_INFO    6    /* informational */
  71. #define LOG_DEBUG    7    /* debug-level messages */
  72.  
  73. #define LOG_PRIMASK    0x0007    /* mask to extract priority part (internal) */
  74. #define LOG_PRI(p)    ((p) & LOG_PRIMASK)    /* extract priority */
  75.  
  76. #define    LOG_MAKEPRI(fac, pri)    (((fac) << 3) | (pri))
  77.  
  78. #ifdef KERNEL
  79. #define LOG_PRINTF    -1    /* pseudo-priority to indicate use of printf */
  80. #endif
  81.  
  82. /*
  83.  * arguments to setlogmask.
  84.  */
  85. #define    LOG_MASK(pri)    (1 << (pri))        /* mask for one priority */
  86. #define    LOG_UPTO(pri)    ((1 << ((pri)+1)) - 1)    /* all priorities through pri */
  87.  
  88. /*
  89.  *  Option flags for openlog.
  90.  *
  91.  *    LOG_ODELAY no longer does anything; LOG_NDELAY is the
  92.  *    inverse of what it used to be.
  93.  */
  94. #define    LOG_PID        0x01    /* log the pid with each message */
  95. #define    LOG_CONS    0x02    /* log on the console if errors in sending */
  96. #define    LOG_ODELAY    0x04    /* delay open until first syslog() (default) */
  97. #define LOG_NDELAY    0x08    /* don't delay open */
  98. #define LOG_NOWAIT    0x10    /* if forking to log on console, don't wait() */
  99. @
  100.